package course8;

public class Cat {
    private String name;
    private int age;
    private String sex;
    private String weight;

    public Cat() {
    }

    public Cat(String name1, int age1) {
        this.name = name1;
        this.age = age1;
    }


   /* public Cat(String name1, int age1) {
    //构造方法
        this.name = name1;
        this.age = age1;
      //Cat cat = new Cat("javacat", 13);
        /*System.out.println("小猫的名字：" + name);
        System.out.println("小猫的年龄：" + age);

    }

    public static void main(String[] args) {
        //创建一个小猫咪的实例
        Cat cat = new Cat("小猫实例", 13);
    }*/

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }


    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
